﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PAS.Helper;

namespace PAS
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write(DataConnHelper.ConnectionString);
        }

        protected void btnSelectOption_Click(object sender, EventArgs e)
        {
            Response.Redirect("");
        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtPwd.Text.Length == 0)
                Alert.MessageBox("请先输入管理员密码");
            DataConnHelper hlp = new DataConnHelper();
            bool isPass = hlp.CheckLogin(txtPwd.Text);
            DataConnHelper.IsLogin = isPass;
            if (isPass)
            {
                Response.Redirect("SysMain.aspx");
            }
            else
                Alert.MessageBox("系统管理员密码不正确");
        }


    }
}
